﻿@using ByteartRetail.Web;
@using ByteartRetail.DataObjects;

@model RoleDataObject

@{
    ViewBag.Title = "编辑用户角色";
}

<hgroup class="title">
    <h1>@Html.Image("Role_32.png")&nbsp;@ViewBag.Title</h1>
</hgroup>

@using (Html.BeginForm("EditRole", "Admin", FormMethod.Post, new { id = "EditRoleForm"}))
{
    @Html.ValidationSummary(true)

        @Html.HiddenFor(model => model.ID)

        <div class="editor-label">
            @Html.LabelFor(model => model.Name)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Name)
            @Html.ValidationMessageFor(model => model.Name)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>
}

<p />
<p>
    <span>@Html.ImageSubmitButton("EditRoleForm", Url.Content("~/Images/Save.png"), "保存", "保存更改")</span>
    <span>&nbsp;</span>
    <span>@Html.ImageActionLink(Url.Content("~/Images/Cancel.png"), "取消编辑", "取消编辑", "Roles", "Admin")</span>
</p>

@section scripts
{
    <script type="text/javascript">
        $(function () {
            $("#Name").focus();
        });
    </script>
}
